<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE HTML>
<html>
<%@ include file="/common/taglibs.jsp" %>
<head>
    <title> Admin</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="../../public/bui/css/main-min.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<%@ include file="/common/head.builive.inc.jsp" %>
<div class="header">

    <div class="dl-log">欢迎您，<span class="dl-log-user">admin</span><a href="###" title="退出系统"
                                                                     class="dl-log-quit">[退出]</a>
    </div>
</div>
<div class="content">
    <div class="dl-main-nav">
        <div class="dl-inform">
            <div class="dl-inform-title">贴心小秘书<s class="dl-inform-icon dl-up"></s></div>
        </div>
        <ul id="J_Nav" class="nav-list ks-clear">
            <li class="nav-item dl-selected">
                <div class="nav-item-inner nav-home">首页</div>
            </li>
        </ul>
    </div>
    <ul id="J_NavContent" class="dl-tab-conten">

    </ul>
</div>


<script>
    BUI.use('common/main', function () {
        var config = [{
            id: 'menu',
            homePage: 'user',
            menu: [{
                text: '功能',
                items: [
                    {id: 'user', text: '用户管理', href: 'user.jsp', closeable: false},
                    {id: 'contract', text: '合约管理', href: 'contract.jsp'},
                    {id: 'presentRecord', text: '提现管理', href: 'presentRecord.jsp'},
                    {id: 'rechargeRecord', text: '充值管理', href: 'rechargeRecord.jsp'},
                    {id: 'machineType', text: '矿机类型管理', href: 'machineType.jsp'},
                    {id: 'revenueRecord', text: '收益管理', href: 'revenueRecord.jsp'},
                    {id: 'purchaseRecord', text: '合约购买记录管理', href: 'purchaseRecord.jsp'},
                    {id: 'purchaseSaleRecord', text: '合约出售记录管理', href: 'purchaseSaleRecord.jsp'},
                    {id: 'powerAccount', text: '用户算力管理', href: 'powerAccount.jsp'},
                    {id: 'purchaseSale', text: '合约购售管理', href: 'purchaseSale.jsp'},
                    {id: 'dataCode', text: '数据字典管理', href: 'dataCode.jsp'}
                ]
            }]
        }];
        new PageUtil.MainPage({
            modulesConfig: config
        });
    });
    $(".dl-log-quit").on("click", function () {
        $.ajax({
            type: 'post',
            url: webRoot + "login/loginout",
            cache: false,
            data: null,
            // dataType: 'json',
            success: function (data) {
                if (data == "success") {
                    window.location.href = webRoot + "/pages/main/index.jsp";
                }
            },
            error: function () {
            }
        });
    });
</script>
</body>
</html>
